/**
 * Created by oneminute on 7/17/14.
 */

var lz = require("../lib/utils/modules")();

exports.get = function (_req, _res, _opts, _callback) {
    var suid = _req.query.suid;
    var user = new lz.User({id: suid});
    user.load({method: "byId"}, function (_err, _user) {
        if (_user && _user.inbusiness) {
            _callback(null, null, user.getInfo('t'));
        } else {
            // 用户店铺已停止运营
            _callback(lz.Config.errors.getError(lz.Config.errors.REQUEST_SHOP_NOT_IN_BUSINESS));
        }
    });
};
